﻿<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE>jquery.codeit-PHP</TITLE>
<link href="../theme/jshighlight-default.css" rel="stylesheet" />
<style>
    [data-language]:before{
        font-style: italic;
        font-size: 45px;
        float: right;
        margin-top: 10px;
        color: goldenrod;
        /*position: relative;*/
        z-index: -1;
        opacity: 0.3;
        filter:alpha(opacity=30);
    }
    [data-language="php"]:before{
        content: "php";
    }
    .php-com{
        color: #CCC;
    }
    .php-mrk{
        color: red;
        font-weight: bold;
    }
    .php-bol{
        color: #F92665;
        font-style: italic;
    }
    .php-var{
        color: #A6E22E;
    }
  </style>
</HEAD>
<BODY>
<pre id="php" data-language="php">
&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;This is the title&lt;/title&gt;
        <script>
            //This is Zero
            var a = NaN;
            function getNull(){
                return null;
            }
        </script>
        <style>
            body{
                background: black;
                font-weight: bold;
            }
            [data-role*="php"]:after{
                display: block;
            }
        </style>
    &lt;/head&gt;
    &lt;body&gt;
        &lt;!--
            &lt;span id="test"&gt;&lt;/span&gt;
            &lt;span id="test"&gt;&lt;/span&gt;
        --&gt;
        &lt;span id="span" class="a" style="float:left;margin:0"&gt;This is some Text="span"&lt;/span&gt;
        &lt;div id="span1"&gt;This is some Text&lt;/div&gt;
        <!-- Fuck You RegExp -->
        &lt;?php
            /* ==Test PHP== */
            echo 'This is some text';
            date('yyyy-mm-dd');
            $bol = true;
            $var = 'this is not a $var'."this is not a $var";
            //Test
        ?&gt;
        <style>
            body{
                margin: 0;
            }
        </style>
        &lt;?php echo 1==2 ? "1==2" : "1!==2"; ?&gt;
        <script>
            // This is first
            var a = 0;
            var b = "this is a string" ,
                c = true,
                d = NaN
            var $ = function(){
                return document.getElementById(id);
            }
        </script>
        <script>
            //This is second
            var a = NaN;
            function getNull(){
                return null;
            }
        </script>
    &lt;/body&gt;
&lt;/html&gt;
</pre>
<pre data-language="php">
&lt;?php
    /**
     * 发送电子邮件
     */
    $to = "someone@example.com";
    $subject = "Test mail";
    $message = "Hello! This is a simple email message.";
    $from = "someonelse@example.com";
    $headers = "From: $from";
    mail($to,$subject,$message,$headers);
    echo "Mail Sent.";
?&gt;

&lt;?php
/*
 * PHP文件上传
 */
function do_upload($upload_dir,$upload_url)
{
    $temp_name = $_files[ 'userfile '][ 'tmp_name '];
    $file_name = $_files[ 'userfile '][ 'name '];
    $file_name = str_replace( "\ ", " ",$file_name);
    $file_name = str_replace( " ' ", " ",$file_name);
    $file_path = $upload_dir.$file_name;
    $thistime=explode( "- ",date( "y-m-d-h-i-s "));
    $thistime=mktime();
    $filename=$thistime.substr($file_name,strrpos($file_name, ". "));
    //文件名检查
    if($file_name = ' ')
    {
        echo "文件名无效.";
        exit;
    }
    if(@move_uploaded_file($_files[ 'userfile '][ 'tmp_name '],$upload_dir.$filename))
    {
        echo "上传成功.";
        echo '<meta http-equiv= "refresh " content= "1;url=www.aimeige.com.cn.php">';
        exit;
    }else
    {
        echo "上传失败.";
        echo '<meta http-equiv= "refresh " content= "1;url=www.zhutiai.com.php">';
        exit;
    }
    echo "end";
}
?&gt;
</pre>
<!--需要先引入jshighlight.core文件再引入扩展语言的文件-->
<script src="../js/jshighlight.core-v1.0.2.src.js"></script>
<script src="../js/lang-php.min.js"></script>
</BODY>
</HTML>
